
function AdapterUtils() {
    this.isPhone = function() {
        if (/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Fennec|BlackBerry|Mobile|IEMobile|MQQBrowser|JUC|Fennec|WosBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(navigator.userAgent)) {
            return true;
        }
        return false;
    }

    this.getWindowSize = function() {
        var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
        var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
        return new Rect(0, 0, w, h);
    }

    this.ratio = 0;
    this.setSizeBase = function(width, realWidth) {
        this.ratio = realWidth / width;
    }
    this.getSize = function(size) {
        return Math.floor(size * this.ratio);
    }
}

var gAdapterUtils = new AdapterUtils();